package com.zxd.test_junit;

import java.math.BigDecimal;

/**
 * ClassName:Calculator
 * Package:com.zxd.test_junit
 *
 * @Date:2023/10/7 16:32
 * @Author:zxde
 */
public class Calculator {
    public int add(int a,int b){
        return a+b;
    }

    public double div(double a,double b){
        BigDecimal ab = BigDecimal.valueOf(a);
        BigDecimal bb = BigDecimal.valueOf(b);
        BigDecimal divide = ab.divide(bb);
        return divide.doubleValue();
    }
}
